import React from "react";
import WeUI from 'react-weui'
import img1 from '../assets/images/img1.webp'
// import EmptyItem from './EmptyItem'

const {
    MediaBox,
    MediaBoxHeader,
    MediaBoxBody,
    MediaBoxTitle,
    MediaBoxDescription
} = WeUI;

const ContestList = function({data}) {
    // console.log(data);
    return (
        <div>
            {
                data.map(item => <ContestItem key={item.id} item={item}/>)
            }
            {/* <ContestItem/> */}
        </div>
    )
}

const ContestItem = function({item}) {
    
    return (
        <>
          <MediaBox type="appmsg" >
            <MediaBoxHeader><img src={img1}/></MediaBoxHeader>
            <MediaBoxBody>
                <MediaBoxTitle>{item.title}</MediaBoxTitle>
                <MediaBoxDescription>
                    {item.desc}
                </MediaBoxDescription>
            </MediaBoxBody>
        </MediaBox>
        </>
    )
}

export default ContestList;